<script setup>
import {ref,provide} from 'vue'
import navx from '@/components/navx.vue'
const web ={
    name:"lcj",
    url:"www.dsfr.com"
}

provide("provideWeb",web)

const user = ref(0)
provide("user",user)

const userAdd = () =>{
    user.value ++
}
provide("provideFuncUserAdd",userAdd) 
</script>

<template>
<h3>依赖与注入父组件</h3>
user:{{user}}
<hr style="height:1px;border:none;border-top:1px solid black;" />
<navx/>
</template>
 
<script>
export default {
    name: "RegisterPage"
}
</script>